<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>编辑博客</title>
</head>
<body>
<form method="post" action="EditBlogAction.jdk?QnewBlog=<%=session.getAttribute("isnewBlog") %><% session.removeAttribute("isnewBlog"); %>">
   <fieldset>
             <legend>基本信息：</legend>
        <table >
             <!-- 显示出错提示 -->
            <%
                 String errorMsg=(String)session.getAttribute("errorMsg");
                 session.removeAttribute("errorMsg");
                 if(errorMsg!=null){
                	 out.print("<tr>"+errorMsg+"<tr>");
                 }
            %>
             <tr><td>文章分类：<input type="text" size="10" name="article_type" value="
             <% 
                 //判断是更新还是新建blog，然后决定是否显示
                 String title=(String)session.getAttribute("title");
                 String content=(String)session.getAttribute("content");
                 String article_type=(String)session.getAttribute("article_type");
                 session.removeAttribute("title");
                 session.removeAttribute("content");
                 session.removeAttribute("article_type");
                 if(article_type!=null){
                	 out.print(article_type);
                 }
              
             %>
             "></td></tr>
             <tr><td>标题：<input type="text" size="20" name="title" value="<% 
             if(article_type!=null){
            	 out.print(article_type);} 
             %>"></td></tr>
             
        </table>
   </fieldset>
   <p>文章内容：</p>
   
   <div id="editor_main"><textarea class="validate-richeditor bad-words min-length-5" 
   cols="40" id="editor_body" name="content" rows="20" style="width: 510px; height: 350px;">
   <%
   if(content!=null){
  	 out.print(content);
   }
   %>
   </textarea></div> 
   
   <input type="submit" value="提交">
   
   
</form>
</body>
</html>